Fix service-related options placement and test sync (clean tree)#844
Fix service-related options placement and test sync (clean tree)#844BigSimmo wants to merge 2 commits into
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
📝 WalkthroughWalkthroughThe PR adjusts service navigation rendering, updates navigation and Supabase SQL contract assertions, aligns a sitemap route placeholder, and refreshes search UI regression test expectations. ChangesNavigation and regression contracts
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/supabase-schema.test.ts (1)
1399-1401: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueTautological assertion —
pg_trgm.similarity_thresholdcheck can never fail.The pattern
if (corrector.includes(X)) { expect(corrector).toContain(X); }is a tautology: ifincludesreturnstrue,toContaintrivially passes; iffalse, the assertion is skipped entirely. This provides zero verification value. If the intent is to assert the similarity threshold only when present, consider making it an unconditional assertion or at minimum logging when the guard skips.♻️ Suggested refactor: make the assertion unconditional
- if (corrector.includes("set pg_trgm.similarity_threshold = 0.3")) { - expect(corrector).toContain("set pg_trgm.similarity_threshold = 0.3"); - } + expect(corrector).toContain("set pg_trgm.similarity_threshold = 0.3");🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/supabase-schema.test.ts` around lines 1399 - 1401, Replace the tautological conditional around the pg_trgm.similarity_threshold check with an unconditional assertion in the relevant test, so the expected setting is always verified. Remove the redundant corrector.includes guard while preserving the existing expected threshold string.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/supabase-schema.test.ts`:
- Around line 1399-1401: Replace the tautological conditional around the
pg_trgm.similarity_threshold check with an unconditional assertion in the
relevant test, so the expected setting is always verified. Remove the redundant
corrector.includes guard while preserving the existing expected threshold
string.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: bf5c92a3-1963-41b1-89a0-465cdcc6d829
📒 Files selected for processing (6)
src/components/services/services-navigator-page.tsxtests/audit-navigation-auth-regressions.test.tstests/site-map.test.tstests/supabase-schema.test.tstests/ui-tools.spec.tstests/ui-universal-search.spec.ts
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #3245 (success). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
|
Superseded by merged PR #842, which already contains the same design-audit service/test updates and is now on main. |
Summary
SearchResultsLayoutheader on services pages so related options render directly beneath service results as expected.Clinical Guidetitle variant and mobile/service selector stability.Verification
npx playwright test tests/ui-accessibility.spec.ts --project=chromium --workers=1npx playwright test tests/ui-universal-search.spec.ts --project=chromium --workers=1npm run test -- tests/site-map.test.ts tests/supabase-schema.test.tsRisk and rollout
Clinical Governance Preflight
Summary by CodeRabbit
Bug Fixes
Tests